#ifndef __LUA_BATTLE_H__
#define __LUA_BATTLE_H__


class LuaBattle : public singleton<LuaBattle>
{
public:
	LuaBattle();
	~LuaBattle();
	void Register();
	static Int32 luaGetTime(lua_State *L);
	static Int32 luaLOGGER_ERROR(lua_State *L);
	static Int32 luaLOGGER_INFO(lua_State *L);
	static Battle* GetBattle(lua_State * L);
	static Battle::Battler* GetBattler(lua_State * L);

	static Int32 luaAddMonsterAt(lua_State *L);
	static Int32 luaSetMonsterAt(lua_State *L);
	static Int32 luaRemoveMonster(lua_State *L);
	static Int32 luaGetRandomTargetIndex(lua_State *L);
	static Int32 luaAddSkillTarget(lua_State *L);
	static Int32 luaAddSkillTargetState(lua_State *L);
	static Int32 luaAddSkillTargetStateEx(lua_State *L);

	static Int32 luaAddEXPAllPlayer(lua_State *L);
	static Int32 luaAddEXPAllPet(lua_State *L);
	static Int32 luaAddMoneyAllPlayer(lua_State *L);
	static Int32 luaAddWoodAllPlayer(lua_State *L);
	static Int32 luaAddFoodAllPlayer(lua_State *L);
	static Int32 luaAddItemAllPlayer(lua_State *L);

	static Int32 luaGetBattlerType(lua_State *L);
	static Int32 luaGetBattlerJDHurt(lua_State *L);
	static Int32 luaGetBattlerFDHurt(lua_State *L);
	static Int32 luaGetBattlerGHHurt(lua_State *L);
	static Int32 luaGetBattlerHP(lua_State *L);
	static Int32 luaGetBattlerHPMax(lua_State *L);
	static Int32 luaSetBattlerHP(lua_State *L);
	static Int32 luaSetBattlerHPChange(lua_State *L);
	static Int32 luaGetBattlerAP(lua_State *L);
	static Int32 luaGetBattlerDP(lua_State *L);
	static Int32 luaGetBattlerPropBJ(lua_State *L);
	static Int32 luaGetBattlerPropSB(lua_State *L);
	static Int32 luaGetBattlerPropFJ(lua_State *L);
	static Int32 luaGetBattlerPropLJ(lua_State *L);
	static Int32 luaSendChatMessageBattler(lua_State *L);

	//static Int32 luaGetBattlerState(lua_State *L);
	//static Int32 luaGetTargetState(lua_State *L);

	static Int32  luaIsBattlerStateNormal(lua_State *L);
	static Int32  luaIsBattlerStateDead(lua_State *L);
	static Int32  luaIsBattlerStateTP(lua_State *L);
	static Int32  luaIsBattlerStateHL(lua_State *L);
	static Int32  luaIsBattlerStateBD(lua_State *L);
	static Int32  luaIsBattlerStateCM(lua_State *L);
	static Int32  luaIsBattlerStateSL(lua_State *L);
	static Int32  luaIsBattlerStateQS(lua_State *L);
	static Int32  luaIsBattlerStateRM(lua_State *L);

	//static Int32 luaGetTargetStateRoundCount(lua_State *L);
	//static Int32 luaSetBattleEndInfoAllPlayer(lua_State *L);
	static Int32 luaSendInfoAllPlayer(lua_State *L);
	static Int32 luaGetBattlerEnhanceHL(lua_State *L);
	static Int32 luaGetBattlerEnhanceBD(lua_State *L);
	static Int32 luaGetBattlerEnhanceHS(lua_State *L);

	//static Int32 luaGetBattlerEnhanceFD(lua_State *L);
	//static Int32 luaGetBattlerEnhanceGH(lua_State *L);
	static Int32 luaGetBattlerResistHL(lua_State *L);
	static Int32 luaGetBattlerResistBD(lua_State *L);
	static Int32 luaGetBattlerResistHS(lua_State *L);
	static Int32 luaGetBattlerResistJZ(lua_State *L);
	static Int32 luaGetBattlerResistSD(lua_State *L);
	static Int32 luaClearBattlerNegativeState(lua_State *L);
	//static Int32 luaGetBattlerResistJD(lua_State *L);

	static Int32 luaSetLearning(lua_State *L);

	static Int32 luaAddPlayerStamina(lua_State *L);
};
#endif
